﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestList
{
    internal class TestComparer : IEqualityComparer<Person>
    {

        public bool Equals(Person x, Person y)
        {
            if (x == null && y == null)
            {
                return false;
            }
            return x.Id == y.Id;
        }


        public int GetHashCode(Person obj)
        {
            if (obj == null)
                return 0;
            return obj.Id.GetHashCode();
        }

    }
}
